<?php
declare (strict_types = 1);

namespace app\front\controller;


use app\BaseController;
use app\exception\HttpExceptions;
use app\model\Origanziation as OModel;
use app\model\Student as StudentModel;
use think\Request;

class Student extends BaseController
{
   public function  origanziationList(Request $request) {
       $data = $request->get(['page','size','kw']);
       if( !isset($data['page'])|| !isset($data['size'])) {
           throw new HttpExceptions('参数不合法');
       }
       if($data['page'] < 1) {
           throw new HttpExceptions('参数不合法');
       }
       $result = OModel::pageList($data,$request->domain(true));
       return $this->result($result);
   }

   public function  list(Request $request) {
       $domain = $request -> domain();
       $data = $request->get(['page','size','kw']);
       if( !isset($data['page'])|| !isset($data['size'])) {
           throw new HttpExceptions('参数不合法');
       }
       if($data['page'] < 1) {
           throw new HttpExceptions('参数不合法');
       }
       $result = StudentModel::pageList($data,$domain,true);
       return $this->result($result);
   }


}
